package uml.view.factory;

import uml.view.ClassFormatter_View;
import uml.view.UMLContainerView;
import uml.view.panels.ClassView;
import uml.view.panels.InterfaceView;

/**
 * A factory used to create UML objects to be placed in a View. Users only need 
 * to handle UMLContainerViews; the factory will decide how to create the specified 
 * object the user requests.  
 * 
 * @author Neil Obetz
 *
 */

public final class ContainerFactory
{

	/**
	 * Returns a default InterfaceView object and returns it to the user.
	 * @return void
	 */
	public static UMLContainerView createInterfaceView ()
	{
		InterfaceView interfaceView = new InterfaceView ();
		ClassFormatter_View formatter = new ClassFormatter_View ();
		formatter.setContainer (interfaceView);
		formatter.setFontItalic ();
		return (interfaceView);
	}

	/**
	 * Returns a default ClassView object and returns it to the user.
	 * @return void
	 */
	
	public static UMLContainerView createClassView ()
	{
		ClassView classView = new ClassView ();
		ClassFormatter_View formatter = new ClassFormatter_View ();
		formatter.setContainer (classView);
		formatter.setFontBold ();
		formatter.setFontSize (15.3f);
		return (classView);
	}
}
